﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using BoostSite.Demo.Definitions.Base.PageTypes;
using BoostSite.Demo.Definitions.CustomProperties.EnumSelector;
using EPiBoost.Core.CustomProperties;
using EPiBoost.Core.CustomProperties.EnumSelector;
using EPiBoost.Core.DataAnnotations;
using EPiServer.Core;
using EPiServer.DataAbstraction;
using EPiServer.DataAnnotations;
using EPiServer.Framework.DataAnnotations;
using EPiServer.Web;
using ExampleEnum = EPiBoost.Core.CustomProperties.EditorDescriptors.ExampleEnum;

namespace BoostSite.Demo.Definitions.Templates.PageTypes.Content
{
	[ContentType(GroupName = PageGroupNames.Content,
		DisplayName = "Simple Content Page",
		Description = "A simple content page",
		AvailableInEditMode = true,
		Order = 2,
		GUID = "{77e347c2-d245-4972-aa65-2e6b6b18c29c}")]
	[AutoImageThumbnail(typeof(SimpleContentPage))]
	public class SimpleContentPage : BaseContentPageType
	{
		[Display(GroupName = "Test")]
		[UIHint("Enum")]
		public virtual string m_SingleEnum { get; set; }
		public virtual SelectedEnumCollection<ExampleEnum> SingleEnum
		{
			get { return SelectedEnumCollection<ExampleEnum>.Parse(m_SingleEnum); }
		}

		[Display(GroupName = "Test")]
		[UIHint("EnumMulti")]
		public virtual string m_MultiEnum { get; set; }
		public virtual SelectedEnumCollection<ExampleEnum> ExampleEnums
		{
			get { return SelectedEnumCollection<ExampleEnum>.Parse(m_MultiEnum); }
		}

	}

}
